import 'package:flutter/material.dart';

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Center(child: Text("主页")),
      ),
      body: Column(
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              TextButton(
                  onPressed: (){
                    Navigator.pushNamed(context, "/data");
                  },
                  child: Text("前往数据显示区")
              ),
              TextButton(
                  onPressed: (){
                    Navigator.pushNamed(context, "/test");
                  },
                  child: Text("前往数据测试区"),
              ),
              TextButton(
                  onPressed: (){
                    Navigator.pushNamed(context, "/shelf");
                  },
                  child: Text("前往书架")
              ),
            ],
          )
        ],
      ),
    );
  }
}
